<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let phone = `
       17338472686
       13954329284
    `
    let reg = /(?<=\d{3})(\d{4})(=?\d{4})/g
    phone = phone.replace(reg, (v,...args)=>{
        console.log(args);
        args[0] = "****"
        console.log(args);
        
        
        return args.splice(0,2).join("")
    })
     console.log(phone);
</script>
</html>